package com.centaline.androidsalesblog.model.databaseobject;

import android.os.Parcel;
import android.os.Parcelable;

import com.centaline.androidsalesblog.model.businissobject.NewPropImgBo;
import com.centaline.androidsalesblog.model.businissobject.NewEstDistrictBo;
import com.google.gson.annotations.SerializedName;

import org.litepal.crud.DataSupport;

import java.util.ArrayList;

/**
 * 新房活动
 *
 * Created by Lihq on 2016/1/27.
 */
public class NewEstActDo extends DataSupport implements Parcelable {

    private String ActId;
    private String EstId;
    private String EstExtId;
    private String ActTitle;
    private String StartDate;
    private String EndDate;
    private String Description;
    private String ActAddress;
    private int BookCnt;
    private int ShowBookCnt;
    private String ActTags;
    @SerializedName("IsOnline")
    private boolean Online;
    private String CreateTime;
    private String AdName;
    private String EstType;
    private int DistrictId;
    private int GScopeId;
    private double lat;
    private double lng;
    @SerializedName("ActImgs")
    private ArrayList<NewPropImgBo> newPropImgBos;
    @SerializedName("District")
    private NewEstDistrictBo newEstDistrictBo;
    private String FileUrl;

    public String getActId() {
        return ActId;
    }

    public void setActId(String actId) {
        ActId = actId;
    }

    public String getEstId() {
        return EstId;
    }

    public void setEstId(String estId) {
        EstId = estId;
    }

    public String getEstExtId() {
        return EstExtId;
    }

    public void setEstExtId(String estExtId) {
        EstExtId = estExtId;
    }

    public String getActTitle() {
        return ActTitle;
    }

    public void setActTitle(String actTitle) {
        ActTitle = actTitle;
    }

    public String getStartDate() {
        return StartDate;
    }

    public void setStartDate(String startDate) {
        StartDate = startDate;
    }

    public String getEndDate() {
        return EndDate;
    }

    public void setEndDate(String endDate) {
        EndDate = endDate;
    }

    public String getDescription() {
        return Description;
    }

    public void setDescription(String description) {
        Description = description;
    }

    public String getActAddress() {
        return ActAddress;
    }

    public void setActAddress(String actAddress) {
        ActAddress = actAddress;
    }

    public int getBookCnt() {
        return BookCnt;
    }

    public void setBookCnt(int bookCnt) {
        BookCnt = bookCnt;
    }

    public int getShowBookCnt() {
        return ShowBookCnt;
    }

    public void setShowBookCnt(int showBookCnt) {
        ShowBookCnt = showBookCnt;
    }

    public String getActTags() {
        return ActTags;
    }

    public void setActTags(String actTags) {
        ActTags = actTags;
    }

    public boolean isOnline() {
        return Online;
    }

    public void setOnline(boolean online) {
        Online = online;
    }

    public String getCreateTime() {
        return CreateTime;
    }

    public void setCreateTime(String createTime) {
        CreateTime = createTime;
    }

    public String getAdName() {
        return AdName;
    }

    public void setAdName(String adName) {
        AdName = adName;
    }

    public String getEstType() {
        return EstType;
    }

    public void setEstType(String estType) {
        EstType = estType;
    }

    public int getDistrictId() {
        return DistrictId;
    }

    public void setDistrictId(int districtId) {
        DistrictId = districtId;
    }

    public int getGScopeId() {
        return GScopeId;
    }

    public void setGScopeId(int GScopeId) {
        this.GScopeId = GScopeId;
    }

    public double getLat() {
        return lat;
    }

    public void setLat(double lat) {
        this.lat = lat;
    }

    public double getLng() {
        return lng;
    }

    public void setLng(double lng) {
        this.lng = lng;
    }

    public ArrayList<NewPropImgBo> getNewPropImgBos() {
        return newPropImgBos;
    }

    public void setNewPropImgBos(ArrayList<NewPropImgBo> newPropImgBos) {
        this.newPropImgBos = newPropImgBos;
    }

    public NewEstDistrictBo getNewEstDistrictBo() {
        return newEstDistrictBo;
    }

    public void setNewEstDistrictBo(NewEstDistrictBo newEstDistrictBo) {
        this.newEstDistrictBo = newEstDistrictBo;
    }

    public String getFileUrl() {
        return FileUrl;
    }

    public void setFileUrl(String fileUrl) {
        FileUrl = fileUrl;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.ActId);
        dest.writeString(this.EstId);
        dest.writeString(this.EstExtId);
        dest.writeString(this.ActTitle);
        dest.writeString(this.StartDate);
        dest.writeString(this.EndDate);
        dest.writeString(this.Description);
        dest.writeString(this.ActAddress);
        dest.writeInt(this.BookCnt);
        dest.writeInt(this.ShowBookCnt);
        dest.writeString(this.ActTags);
        dest.writeByte(Online ? (byte) 1 : (byte) 0);
        dest.writeString(this.CreateTime);
        dest.writeString(this.AdName);
        dest.writeString(this.EstType);
        dest.writeInt(this.DistrictId);
        dest.writeInt(this.GScopeId);
        dest.writeDouble(this.lat);
        dest.writeDouble(this.lng);
        dest.writeTypedList(newPropImgBos);
        dest.writeParcelable(this.newEstDistrictBo, flags);
        dest.writeString(this.FileUrl);
    }

    public NewEstActDo() {
    }

    protected NewEstActDo(Parcel in) {
        this.ActId = in.readString();
        this.EstId = in.readString();
        this.EstExtId = in.readString();
        this.ActTitle = in.readString();
        this.StartDate = in.readString();
        this.EndDate = in.readString();
        this.Description = in.readString();
        this.ActAddress = in.readString();
        this.BookCnt = in.readInt();
        this.ShowBookCnt = in.readInt();
        this.ActTags = in.readString();
        this.Online = in.readByte() != 0;
        this.CreateTime = in.readString();
        this.AdName = in.readString();
        this.EstType = in.readString();
        this.DistrictId = in.readInt();
        this.GScopeId = in.readInt();
        this.lat = in.readDouble();
        this.lng = in.readDouble();
        this.newPropImgBos = in.createTypedArrayList(NewPropImgBo.CREATOR);
        this.newEstDistrictBo = in.readParcelable(NewEstDistrictBo.class.getClassLoader());
        this.FileUrl = in.readString();
    }

    public static final Parcelable.Creator<NewEstActDo> CREATOR = new Parcelable.Creator<NewEstActDo>() {
        @Override
        public NewEstActDo createFromParcel(Parcel source) {
            return new NewEstActDo(source);
        }

        @Override
        public NewEstActDo[] newArray(int size) {
            return new NewEstActDo[size];
        }
    };
}
